package component.controls.ui
{
	import component.controls.Button;
	import component.global.ComponentSetting;
	import component.global.manager.EventMgr;
	import component.global.manager.TipsMgr;
	import component.global.utils.DisplayUtils;
	import component.global.utils.FilterUtil;
	import component.global.utils.GraphicsUtils;
	
	import flash.events.MouseEvent;
	
	public class ArrowButton extends Button
	{
		public function ArrowButton($width:int=ComponentSetting.ARROW_BUTTON_DEFAULT_SIZE, $height:int=ComponentSetting.ARROW_BUTTON_DEFAULT_SIZE)
		{
			super("", $width, $height);
		}
		
		override protected function init():void{
			buttonMode = true;
			_filters = [];
			_filters.push([FilterUtil.createDropShadowFilter(45),FilterUtil.createDropShadowFilter(45,true,1)]);
			_filters.push([FilterUtil.createDropShadowFilter(45,false,2,5),FilterUtil.createGlowFilter(0x0000FF,4,true)]);
			_filters.push([FilterUtil.createDropShadowFilter(45,true,1,5),FilterUtil.createGlowFilter(0x0000FF,4)]);
			_filters.push([FilterUtil.createDropShadowFilter(45,true,1),FilterUtil.createColorMatrixFilter(FilterUtil.GRAY_MATRIX)]);
			_background = GraphicsUtils.createArrowRectangle(_width,_height);
			_background.filters = _filters[0];
			
			TipsMgr.Instance.addTip(this);
			EventMgr.Instance.addEvent(this,[MouseEvent.ROLL_OVER,MouseEvent.ROLL_OUT,MouseEvent.MOUSE_DOWN,MouseEvent.MOUSE_UP],[__onMouseEventHandler,__onMouseEventHandler,__onMouseEventHandler, __onMouseEventHandler]);
			DisplayUtils.addDisplayObject(this,_background);
		}
	}
}